import React, { Component } from 'react';
import { Button } from 'antd';

interface Greeting {
  name: string;
  firstName?: string,
  lastName?: string
};

interface State {
  count: number;
}

class HelloWorld3 extends Component<Greeting, State> {
  state: State = {
    count: 0
  };

  static defaultProps = {
    firstName: 'ataola',
    lastName: 'super'
  };

  render() {
    return (
      <>
        <p>you count {this.state.count} times.</p>
        <Button onClick={() => this.setState({ count: this.state.count + 1 })}>{this.props.name}</Button>
        <Button>{this.props.firstName}</Button>
        <Button>{this.props.lastName}</Button>
      </>
    );
  }

}

export default HelloWorld3;
